struct uart_port {
	struct uart_ops *ops;	
	struct circ_buf xmit;
};

#define NCCS 19        
struct termios {       
    tcflag_t c_iflag;       /* input mode flags */
    tcflag_t c_oflag;       /* output mode flags */
    tcflag_t c_cflag;       /* control mode flags */
    tcflag_t c_lflag;       /* local mode flags */
    cc_t c_cc[NCCS];        /* control characters */
    cc_t c_line;            /* line discipline (== c_cc[19]) */
    speed_t c_ispeed;       /* input speed */
    speed_t c_ospeed;       /* output speed */
}; 

struct uart_operations {
	int	 (*tx_empty)(struct uart_port *port);
    void (*stop_tx)(struct uart_port *port);
    void (*start_tx)(struct uart_port *port);
    void (*stop_rx)(struct uart_port *port);
    void (*break_ctl)(struct uart_port *port, int ctl);
    int  (*startup)(struct uart_port *port);
    void (*shutdown)(struct uart_port *port);
    void (*set_termios)(struct uart_port *, struct termios *term);
};

struct console {
};

struct circ_buf {
    char *buf;
    int head;
    int tail;
}; 

struct uart_state {
	struct circ_buf xmit;
	struct uart_port *uart_port;
};

struct uart_driver {
	struct tty_driver tty_driver;
	struct uart_operations *uart_ops;
};

struct uart_dev {
	struct tty_dev tty_dev;
};

